<template>
  <div class="note-empty">
    <div class="welcome">
      <div class="welcome-text">
        <h2>欢迎使用 BNote</h2>
        <p>一个简单而强大的笔记应用</p>
        <!-- 快捷键 -->
        <div class="shortcut" style="margin-top: 20px">
          Ctrl + N <span class="shortcut-text" @click="createNote">新建笔记</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import {useRouter} from 'vue-router'

const router = useRouter()

const openNote = () => {
  router.push('/note')
}
</script>

<style lang="scss" scoped>
.note-empty {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--el-bg-color);

  .welcome {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    .welcome-text {
      text-align: center;
      margin-bottom: 20px;

      h2 {
        font-size: 24px;
        margin: 0 0 8px;
        color: var(--el-text-color-primary);
      }

      p {
        font-size: 16px;
        margin: 0;
        color: var(--el-text-color-secondary);
      }

      .shortcut {
        font-size: 18px;
        color: var(--el-text-color-secondary);

        .shortcut-text {
          margin: 0 10px;
          cursor: pointer;
        }

        .shortcut-text:hover {
          color: var(--el-color-primary);
        }
      }
    }
  }
}
</style>
